/**
 * Delta X Firmware
 * Copyright (c) 2020 DeltaXFirmware [https://github.com/deltaxrobot/Delta-X-Firmware]
 *
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#pragma once

#include "config.h"

/**
 * 定义轴
 */
typedef enum {
    THETA_1 = 0, // 机械臂1的角度
    THETA_2, // 机械臂2的角度
    THETA_3, // 机械臂3的角度
#ifdef DELTA_AXIS_4
    AXIS_4, // 第四轴的参数
#endif // DELTA_AXIS_4
#ifdef DELTA_AXIS_5
    AXIS_5, // 第五轴的参数
#endif // DELTA_AXIS_5
#ifdef CLIP
    CLAMP // 夹子的参数
#endif // CLIP
} AXIS;

/**
 * 如果预设反向，那么定义的方向变量将反向
 */
#ifdef REVERSE_DIRECTION
typedef enum {
    DECREASE = 0,
    INCREASE
} VARIATION;
#else
typedef enum
{
    INCREASE = 0,
    DECREASE
}VARIATION;
#endif // reverse direction

/**
 * 运动方式
 */
typedef enum {
    USE_STEPPER = 0, // 步进电机
    use_servo // 伺服电机
} MOTIVE;

/**
 * 末端执行器枚举类型
 */
typedef enum {
    USE_VACUUM = 0, // 真空泵
    USE_CLIP, // 夹子
    USE_PEN, // 笔
    USE_LASER, // 激光
    USE_PRINTER, // 打印机
    USE_CUSTOM // 自定义
} END_EFFECTOR;

/**
 * 段的枚举
 */
typedef enum {
    BEGIN_SEG = 0, // 开始阶段
    END_SEG, // 结束阶段
    CHANGE_VELOCITY_SEG, // 变速度阶段
    FIXED_VELICITY_SEG, // 匀速阶段
    MOVING_HOME // 回零点
} TYPE_SEGMENT;

/**
 * LED状态灯
 */
typedef enum {
    RED = 0,
    GREEN,
    BLUE,
} COLOR;

//#define A(CODE) " " CODE "\n\t"
